package cn.xgxd.utils;

import org.springframework.stereotype.Component;
@Component
public class UserContext {
    public static ThreadLocal<String> threadLocal= new ThreadLocal<>();
    public void removeUserId(){
        threadLocal.remove();
    }
    public static void setUserId(String id) {
        threadLocal.set(id);
    }
    public static String getUserId() {
        return threadLocal.get();
    }



}
